var e, t = (e = require("@vant/weapp/toast/toast")) && e.__esModule ? e : {
    default: e
};

var a = require("../../utils/request"), d = require("../../utils/api");

Page({
    data: {
        activeName: "",
        show: !1,
        refundedRecord: [],
        currentRefundedRecord: {}
    },
    onShow: function() {
        this.getRefundedRecord();
    },
    onChange: function(e) {
        this.setData({
            activeName: e.detail
        });
    },
    showPopup: function(e) {
        this.setData({
            currentRefundedRecord: e.currentTarget.dataset.refunditem,
            show: !0
        });
    },
    closePopup: function() {
        this.setData({
            show: !1
        });
    },
    getRefundedRecord: function() {
        var e = this;
        a.request(a.HttpMethod.GET, d.apiRoute.getRefundedRecordByJwt, {}).then(function(a) {
            "20000" == a.code ? e.setData({
                refundedRecord: a.data
            }) : (0, t.default)({
                message: a.message,
                duration: 5e3
            });
        });
    }
});